<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/sys/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>修改角色信息</title>
<%@ include file="/WEB-INF/sys/include/css.jsp"%>
</head>
<body>
<form id="form" action="${path }/role/update.json" method="post">
<div class="form">
	<div class="title">修改角色信息</div>
	<div class="group">
		<div class="label">*角色名称:</div>
		<div class="item"><input type="text" name="role_name" id="role_name" maxlength="20" value="${role.role_name }" /></div>
	</div>
	<div class="group">
		<div class="label">*子组可见:</div>
		<div class="item">
			<input type="radio" id="subgroup0" name="subgroup" value="0" <c:if test="${role.subgroup != 1 }">checked="checked"</c:if> /><label for="subgroup0" class="label">子组不可见</label>
			<input type="radio" id="subgroup1" name="subgroup" value="1" <c:if test="${role.subgroup == 1 }">checked="checked"</c:if> /><label for="subgroup1" class="label">子组可见</label>
		</div>
	</div>
	<div class="group">
		<div class="label">备注:</div>
		<div class="item"><textarea id="remark" name="remark">${role.remark }</textarea></div>
	</div>
	<div class="buttons">
		<button class="highlight" id="submit1" type="button">确定</button>
		<button type="button" id="cancel1">取消</button>
		<input type="hidden" id="roleid" name="roleid" value="${role.roleid}" />
		<input type="hidden" id="groupid" name="groupid" value="${role.groupid }" />
	</div>
</div>
</form>

<%@ include file="/WEB-INF/sys/include/script.jsp" %>
<script type="text/javascript">
$(function(){
	$("#form").ligerForm({inputWidth: 300});
	
	verifyForm("form", {}, function(){
		$("#form").ajaxForm(function(data){
			UiUtil.isSuccess(data, "修改角色信息成功", function(){
				UiUtil.closeForm(true);
			});
		});
	});
	
	$("#submit1").click(function(){
		UiUtil.lockButton('submit1');
		$("#form").submit();
	});

	$("#cancel1").click(function(){
		UiUtil.closeForm();
	});
});
</script>
</body>
</html>